package com.gulimall.ware.exception;

/**
 * @author kkk
 * @date 2022/8/5
 */
public class NoStockException extends RuntimeException {
    private Long skuId;

    public NoStockException(Long skuId) {
        super(String.format("商品id%d没有足够的库存了", skuId));
        this.skuId = skuId;
    }

    public NoStockException() {
        super("商品没有足够的库存了");
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }
}
